
import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
    return request({
        url: `common/v1/adminDict`,
        params
    })
}
//新增活动
export function addInvite(data) {
    return request({
        url: `/invite/activity/v1`,
        method: 'post',
        data
    })
}
//编辑活动
export function editInvite(data) {
    return request({
        url: `/invite/activity/v1`,
        method: 'put',
        data
    })
}

//查询活动信息列表
export function inviteList(query) {
    return request({
      url: '/invite/activity/v1/list',
      method: 'get',
      params: query
    })
}
//查询活动信息详情
export function inviteDetail(id) {
    return request({
      url: '/invite/activity/v1/detail/' + id,
      method: 'get'
    })
}
//查询活动记录信息列表
export function activityList(query) {
    return request({
      url: '/invite/activity/v1/record/list',
      method: 'get',
      params: query
    })
}

//查询活动统计信息详情
export function activityStatistics(id) {
    return request({
      url: `/invite/activity/v1/statistics/${id}`,
      method: 'get',
    })
}

//编辑虚拟用户数量
export function editActivity(params) {
    return request({
        url: `/invite/activity/v1/record`,
        method: 'put',
        params,
    })
}

//新增虚拟用户
export function addVirtual(data) {
    return request({
        url: `/invite/activity/v1/record`,
        method: 'post',
        data
    })
}
//查询自动添加配置
export function recordInfo(id) {
    return request({
      url: `/invite/activity/v1/record/auto/info`,
      method: 'get',
    })
}
//修改自动添加配置
export function addRecord(data) {
    return request({
        url: `/invite/activity/v1/record/auto/info`,
        method: 'put',
        data ,
    })
}
//启用-停用自动添加
export function autoRecord(params) {
    return request({
        url: `/invite/activity/v1/record/auto`,
        method: 'put',
        params ,
    })
}
